{extend name="public/base" /}

{block name="title"}<title>奖票活动</title>{/block}

{block name="pjax_container"}
<style>
 
.content-header>.breadcrumb>li{
    color: #999;
}
.content-header>.breadcrumb>.active{
    color: #666;
}
.content-header{
    height: 51px;
 
}
.btn-primary{
      background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 5px 10px; 
    line-height: 24PX;
}
.box-primary{
  border-top-color: #ecf0f5 !important;
  border-top-width: 16px;
  
}
.btn-primary:hover{
     background-color: #1890FF;
    color: #fff;
    border: none;
    opacity: .9;
    border-radius: 6px !important; 
}
.delete-one{
    background-color: ff4141 !important;
    margin-left: 15px;
    border-radius: 6px;
}
.sreachs{
       background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 7px 15px; 
}
</style>
<section class="content-header">
    <ol class="breadcrumb">
        <li>奖票管理</li>
        <li class="active">奖票活动</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">

                <div class="box-tools" style="margin:5px;">
                    <form id="form1" action="{:search_url(['name'])}" method="GET" pjax-search="">
                        <input type="hidden" name="page" value="1" />
                        <div class="input-group input-group-sm">
                            <div style="width: 247px;">
                                <input class="timepicker" name="name" value="{:input('get.name')}" placeholder="活动名称"  style="margin: 0px 5px;padding-left: 3px;border: 1px solid #ccc;height: 34px;border-radius: 3px;" AUTOCOMPLETE="off">
                                <div class="input-group-btn" style="display: inline-block;">
                                    <button type="submit" class="btn btn-default sreachs">
                                        <i class="fa fa-search"></i> 查询
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="box-header with-border">
                    <div class="pull-left">
                        <a href="/company/ticket/activity_edit" class="btn btn-sm btn-primary xzrw"><i class="fa fa-save"></i> 新增</a>
                    </div>
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-bordered table-hover">
                        <tr>
                            <!--<th>ID{:table_sort("id")}</th>-->
                            <th>活动名称</th>
                            <th>报名截止时间</th>
                            <!--<th>报名最大人次</th>-->
                            <th>操作</th>
                        </tr>
                        {volist name="list" id="v"}
                        <tr>
                            <!--<td>{$v["id"]}</td>-->
                            <td>{$v.name}</td>
                            <td>{:date('Y-m-d H:i', $v["end_time"])}</td>
                            <!--<td>{$v["apply_max"]}</td>-->
                            <td>
                                {if condition="$v.draw_time > time()"}
                                <a class="btn btn-primary btn-xs" href="/company/ticket/activity_edit/id/{$v.id}">编辑</a>
                                {else:}
                                <a class="btn btn-primary btn-xs" href="/company/ticket/activity_draw/id/{$v.id}">抽奖</a>
                                {/if}
                            </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
                <div class="box-footer clearfix">
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</section>
{/block}
